#include "stdio.h"
#include "math.h"
#include "string.h"

main()
{
    long n,k,i,out=1;
    int tq;
    short int shu[10001];
    
    scanf("%ld%ld",&n,&k);
    
    memset(shu,0,sizeof(shu));    
    for (i=1;i<=n;i++)
    {
        scanf("%d",&tq);
        if (shu[tq]==0)
        {
            shu[tq]=1;
            shu[0]++;
            if (shu[0]==k) 
            {
                out++;
                memset(shu,0,sizeof(shu));
            }    
        }    
    }    
    printf("%ld\n",out);
}    
